package com.ruoyi.system.service;

import java.io.IOException;
import java.util.List;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.QxChestnutAdoptModel;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import com.alibaba.fastjson2.JSONObject;
import javax.servlet.http.HttpServletResponse;

import javax.servlet.http.HttpServletResponse;

/**
 * 板栗树认领主Service接口
 * 
 * @author ruoyi
 * @date 2023-07-28
 */
@Service
public interface IQxChestnutAdoptModelService 
{
    /**
     * 查询板栗树认领主
     * 
     * @param treeId 板栗树认领主主键
     * @return 板栗树认领主
     */
    public QxChestnutAdoptModel selectQxChestnutAdoptModelByTreeId(Long treeId);

    /**
     * 查询板栗树认领主列表
     * 
     * @param qxChestnutAdoptModel 板栗树认领主
     * @return 板栗树认领主集合
     */
    public List<QxChestnutAdoptModel> selectQxChestnutAdoptModelList(QxChestnutAdoptModel qxChestnutAdoptModel);

    /**
     * 新增板栗树认领主
     * 
     * @param qxChestnutAdoptModel 板栗树认领主
     * @return 结果
     */
    public int insertQxChestnutAdoptModel(QxChestnutAdoptModel qxChestnutAdoptModel);

    /**
     * 修改板栗树认领主
     * 
     * @param qxChestnutAdoptModel 板栗树认领主
     * @return 结果
     */
    public int updateQxChestnutAdoptModel(QxChestnutAdoptModel qxChestnutAdoptModel);

    /**
     * 批量删除板栗树认领主
     * 
     * @param treeIds 需要删除的板栗树认领主主键集合
     * @return 结果
     */
    public int deleteQxChestnutAdoptModelByTreeIds(Long[] treeIds);



    public   String importTreeChestnut(List<QxChestnutAdoptModel> treeChestnutList, Boolean isUpdateSupport, String operName);
    /**
     * 删除板栗树认领主信息
     * 
     * @param treeId 板栗树认领主主键
     * @return 结果
     */
    public int deleteQxChestnutAdoptModelByTreeId(Long treeId);

    /**
     * 板栗实体导入方法
     * @param file
     * @return
     */
    public String importDataTreeChestnut(MultipartFile file, boolean updateSupport,String userName) throws IOException;


    /**
     * 板栗树图片上传接口
     * @param file 文件图片
     * @return
     */
    public AjaxResult blUploadImage(MultipartFile file);

    public AjaxResult blUploadImageRemove(String urlPath);


    public void  importTemplateThreeExcel(HttpServletResponse response) throws IOException;

    /**
     * 树苗认养申请
     * @param file
     * @return
     * @throws Exception
     */
    public void apply(QxChestnutAdoptModel qxChestnutAdoptModel) throws Exception;


    /**
     * 树苗认养审核
     * @return
     * @throws Exception
     */
    public AjaxResult approve(JSONObject paramObj);

    /**
     * 导出树木记录
     * @param response
     * @param qxChestnutAdoptModel
     */
    public void exportModelListToExcelService(HttpServletResponse response, QxChestnutAdoptModel qxChestnutAdoptModel);

}
